/**
 * @Company: 北京慧点科技有限公司 | www.smartdot.com.cn
 * @Copyright 1998-2020 © Smartdot Technologies Co., Ltd.
 */
package com.springlearn.zhoufei.other.spring.demo2;

import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;

@Configurable//相当于Bean2.xml
public class HelloWorld6_1 {
    @Bean//相当于  <bean id="HelloWorld6" class=" com.springlearn.zhoufei.other.spring.demo2.HelloWorld6"/>
    public HelloWorld6 HelloWorld6() {
        return new HelloWorld6();
    }
    
    public static void main(String[] args) {

        ApplicationContext context = new AnnotationConfigApplicationContext(HelloWorld6_1.class);
        HelloWorld6 HelloWorld6 = context.getBean(HelloWorld6.class);
        System.out.println(HelloWorld6.toString());
    }
}